package cl.inacap.adm.proyect.action.common;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.log4j.Logger;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

/**
 * Logout de la aplicación Nota de Pedido<p>
 *
 * Registro de Versiones:<ul>
 * <li>17/04/2011 [fsandoval - schema Ltda.]: Versión Inicial</li>
 * </ul><p>
 * 
 * <b>Todos los derechos reservados - Hites</b><p>
 *
 */
public class LogoutAction extends BaseAction {

	protected static Logger logger = Logger.getLogger( LogoutAction.class );

    /**
     * Logout
     * <p>
     *
     * Registro de versiones:<ul>
     *
     * <li>1.0 17/04/2011 Francisco Sandoval (schema Ltda.) - Versión inicial
     *
     * </ul><p>
     */
    public ActionForward logout( ActionMapping mapping, ActionForm form, 
                                 HttpServletRequest request, HttpServletResponse response) throws Exception {
    	request.getSession().invalidate();
    	return mapping.findForward( "logout" );
    }
    
}
